//提交订单
$(function(){
	$('#_save_address_button').click(function(){
		var province = $('.province').val();
		var county = $('.county').val();
		var city = $('.city').val();
		var address = $('#address').val();
		var name = $('#name').val();
		var phone = $('#phone').val();
		var tel = $('#tel').val();
		// $.post(APP+'/add_address',{Select1:Select1,address:address,name:name,phone:phone,tel:tel},function(){

 	// 	},'json');
 	$.ajax({
 		url:APP+'/add_address',
 		data:{province:province,county:county,city:city,address:address,name:name,phone:phone,tel:tel},
 		type:'post',
 		dataType:"json",
 		success : function(data){
 			var html="<dd class='dd'>\
 				<div class='new_address' id='address_list'>\
						<ul class='address_form'>\
						<li>\
						<span class='project_Title'>\
						<em>*</em>\
								详细地址：\
							</span>\
							"+data.province+county+city+address+"\
						</li>\
						<li>\
							<span class='project_Title'>\
								<em>*</em>\
								收 货 人：\
							</span>\
							"+data.name+"\
						</li>\
						<li>\
							<span class='project_Title'>\
							<em>*</em>\
							手　　机：\
							</span>\
							"+data.phone+"\
						</li>\
						</ul>\
					</div>\
					</dd>";
					$('.dd').html(html);
            var id=data.id;
            $('.hi').val(id);

 		}
 		
 	})
	})


	// $('#_save_address_button').click(function(){
	// 	var address = $.trim($("[address=address]").val());
	// 	var name = $.trim($("[name=name]").val());
	// 	var phone = $.trim($("[phone=phone]").val());
	// 	var tel = $.trim($("[tel=tel]").val());
	// 	if(address==''){
	// 		LDF.msg('详细内容不能为空！',1000);
	// 		return false;
	// 	}
	// 	if(name==''){
	// 		LDF.msg('收货人不能为空！',2000);
	// 		return false;
	// 	}
	// 	if(phone=='' || tel==''){
	// 		LDF.msg('请填写联系方式',2000);
	// 		return false;
	// 	}
	// 	$.ajax({
	// 		url:"ajax.php",
	// 		type:"post",
	// 		dataType:"json",
	// 		data:$('#add_address').serialize(),
	// 		success:function(data){
	// 			if(data.state==1){
	// 				var html="<li>\
	// 				<div class='author'>\
	// 					"+data.data.sname+"<i>("+data.data.time+")</i>\
	// 				</div>\
	// 				<div>"+data.data.content+"</div></li>";
	// 				$('ul').prepend(html);
	// 			}
	// 		}
	// 	})
	// })
})




	


	




